/* 消息框基础 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    border-radius: 4px;
    background: #333;
    color: white;
    z-index: 999;
    animation: messageSlideDown 0.3s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    word-break: break-word;
    transition: all 0.3s ease;
}

/* 类型 */
.message-info {
    background: #1890ff;
}

.message-success {
    background: #52c41a;
}

.message-error {
    background: #ff4d4f;
}

.message-warning {
    background: #faad14;
    color: #333;
}

.message-loading {
    background: #0066CC;
}

/* 位置 */
.message-top {
    top: 20px;
}

.message-middle {
    top: 50%;
    transform: translate(-50%, -50%);
}

.message-bottom {
    top: auto;
    bottom: 20px;
    transform: translateX(-50%);
}

/* 大小 */
.message-small {
    padding: 8px 16px;
    font-size: 12px;
}

.message-medium {
    padding: 12px 20px;
    font-size: 14px;
}

.message-large {
    padding: 16px 24px;
    font-size: 16px;
}

/* 内容 */
.message-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-icon {
    flex-shrink: 0;
    font-size: 16px;
}

.message-text {
    flex: 1;
    line-height: 1.5;
}

.message-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 8px;
    transition: opacity 0.2s;
}

.message-close:hover {
    opacity: 0.8;
}

/* 动画 */
@keyframes messageSlideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes messageSlideUp {
    from {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes messageFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 响应式 */
@media (max-width: 600px) {
    .message {
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
    }
    
    .message-middle {
        transform: translateY(-50%);
    }
    
    .message-bottom {
        transform: none;
    }
}
